import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Detail from './views/Detail.vue'
import NewsCenter from './views/NewsCenter.vue'
import Company from './views/Company.vue'
import aboutUs from './views/aboutUs.vue'
import info from './views/info.vue'
import InfoMore from './views/InfoMore.vue'

Vue.use(Router)




export default new Router({
  mode: 'history',
  scrollBehavior () {
    return { x: 0, y: 0 }
  },
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/detail/:type/:id',
      name: 'detail',
      component: Detail
    },
    {
      path: '/info/:type/:id',
      name: 'info',
      component: info
    },
    {
      path: '/newsCenter/:type',
      name: 'newsCenter',
      component: NewsCenter
    },
    {
      path: '/company/:type',
      name: 'company',
      component: Company
    },
    {
      path: '/infoMore/:type/:id',
      name: 'InfoMore',
      component: InfoMore
    },
    {
      path: '/aboutUs',
      name: 'aboutUs',
      component: aboutUs
    },
  ]
})
